package com.itheima.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <h1>token错误状态枚举</h1>
 *
 * @author <a href="11n_yd2h5e1jx8@dingtalk.com">叶世铭</a>
 * @since 2023/2/2
 */
@Getter
@AllArgsConstructor
public enum TokenErrorEnum {

    /**
     * accessToken过期
     */
    ACCESS_TOKEN_EXPIRE(4001, "accessToken过期，请尝试刷新token"),

    /**
     * token格式错误
     */
    TOKEN_ILLEGAL(4002, "token格式错误，请检查"),

    /**
     * refreshToken过期
     */
    REFRESH_TOKEN_ADVENT(4003, "refreshToken过期，请重新登录"),

    /**
     * 当前账号已被登录
     */
    ACCOUNT_ALREADY_LOGIN(3001,"当前账号已被登录，请重新登录");

    private final Integer code;

    private final String errorMsg;
}
